package ink.xiaobaibai.common;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @description: 微信公共信息
 * @author: 小白白
 * @create: 2021-05-19
 **/

@Component
public class WxCommon {

    public static final String APPID = "wx40153d7167eaf77a";

    public static final String SECRET = "3aab9be338b34ce72408c574a4bd331c";

    //支付类

    /**
     * 证书本地路径
     */
    public static String KEYPATH;

    /**
     * 回调地址 必须为https地址
     */
    public static String NOTIFY_URL;

    /**
     * 证书密码
     */
    public static final String KEYPASS = "1610248749";

    /**
     * apiv3密钥
     */
    public static final String APIV3KEY = "fP0gF2gI1gY9pS4wY5hD4jM3mZ1aJ2mH";

    /**
     * 商户号
     */
    public static final String MCHID = "1610248749";

    /**
     * 证书号
     */
    public static final String SERIALNUMBER = "2F2A6F5DC74FA85C340C12808107809BEAFBED00";


    @Value("${wx.pay.keypath}")
    public void setKEYPATH(String keypath) {
        System.out.println(keypath);
        KEYPATH = keypath;
    }

    @Value("${wx.pay.notify_url}")
    public void setNotifyUrl(String notifyUrl) {
        System.out.println(notifyUrl);
        NOTIFY_URL = notifyUrl;
    }
}
